package com.linkage.usercenter.dao;

import com.linkage.usercenter.pojo.entity.CoreDptInfo;
import com.linkage.usercenter.pojo.vo.DptInfoVO;
import com.linkage.usercenter.pojo.vo.DptParentVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CoreDptInfoMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(CoreDptInfo record);

    int insertSelective(CoreDptInfo record);

    CoreDptInfo selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(CoreDptInfo record);

    int updateByPrimaryKey(CoreDptInfo record);

    List<CoreDptInfo> queryByOrgCode(String orgCode);

    List<CoreDptInfo> queryByDptCode(String dptCode);

    List<CoreDptInfo> querySubRecordByDptCode(String dptCode);

    List<CoreDptInfo> queryByOrgCodeAndLevel(String orgCode);

    List<CoreDptInfo> queryByParentCode(String dptCode);

    List<String> queryCodeByParentCode(String dptCode);

    List<CoreDptInfo> queryAllRecordByLevel();

    CoreDptInfo queryParentDptByUserCode(String userCode);

    int selectRecordNumByDptCode(String dptCode);

    List<DptParentVO> getDptDicByDptType();

    List<DptParentVO> getDptDicByDptTypeForCom();

    List<CoreDptInfo> queryByCodeList(List<String> dptCodeList);

    String getDptCodeByUserCode(String userCode);

    List<CoreDptInfo> queryAllRecord();

    List<DptInfoVO> queryDptListByName(@Param("dptOrgCode")String dptOrgCode, @Param("name")String name);
}